import { history } from 'umi';


// 所有路由权限验证
export function render(oldRender: any) {
    console.log('render', history)
   const token = localStorage.getItem('token');
   console.log('token', token)
   if(!token) { oldRender() } 
   else {
    history.push('/login'); 
    oldRender()
   }
}

